$(".content .title li").on("click", function () {
    $(this).addClass("bottom").siblings("li").removeClass("bottom")
})
$(".playNew").on("click", function () {
    $(".play-new").show().siblings("div").hide()
})
$(".playHot").on("click", function () {
    $(".play-hot").show().siblings("div").hide()
})
$(".playCate").on("click", function () {
    $(".play-category").show().siblings("div").hide()
})

// 发现酷玩--最新
$.ajax({
    url: "http://127.0.0.1:3000/guid/new",
    type: "get",
    success: function (res) {
        // console.log(res);
            for (var i = 0; i < res.length; i++){
                // console.log(res[i]);
                $(".c-play .play-new ul").append(`
                <li>
                <a href="../guid/guide-play.html">
                    <img src=${res[i].img} alt="">
                    <h4>${res[i].text}</h4>
                    <div class="liuliang">
                        <div class="dianzan">
                            <span>
                                <img src="../img/css/img/xin.png" alt="">
                                ${res[i].like}
                            </span>
                            <span>
                                <img src="../img/css/img/reply.png" alt="">
                                ${res[i].words}
                            </span>
                        </div>
                    </div>
                </a>
                </li>
                `)
            }
    }
})

// 发现酷玩--最热
$.ajax({
    url: "http://127.0.0.1:3000/guid/hot",
    type: "get",
    success: function (res) {
        // console.log(res);
        for (var i = 0; i < res.length; i++){
            // console.log(res[i].img);
            $(".c-play .play-hot ul").append(`
            <li>
                <img src=${res[i].img} alt="">
                <h4>${res[i].text}</h4>
                <div class="liuliang">
                    <div class="dianzan">
                        <span>
                            <img src="../img/css/img/xin.png" alt="">
                            ${res[i].like}
                        </span>
                        <span>
                            <img src="../img/css/img/reply.png" alt="">
                            ${res[i].words}
                        </span>
                    </div>
                </div>
            </li>
            `)
        }
    }
})
// 加载更多
$(".mores").on("click", function () {
    console.log(1);
    $(".c-play").css("height", "1300px")
    $(this).html("没有更多了~").css("color","#333")
})